'use strict';

module.exports = {
// 处理成功响应
  success({ data = null, msg = '请求成功' }) {
    this.body = {
      code: 0,
      data,
      msg,
    };
    this.status = 200;
  },

  error({ detail = null, msg = '请求失败' }) {
    this.body = {
      code: -1,
      detail,
      msg,
    };
  },
};
